#include <stdio.h>
#include "bmp24.h"
#include "a.h"
int main()
{

    int fd_lcd;
    fd_lcd = open("/dev/fb0", O_RDWR);

    if (fd_lcd < 0)
    {
        printf("open lcd error: %s\n", strerror(errno));
        return -1;
    }
    printf("open lcd success\n");

    int (*lcd_mmap)[800] = mmap(NULL, 800 * 480 * 4, PROT_READ | PROT_WRITE, MAP_SHARED, fd_lcd, 0);
    printf("mmap success\n");
    printf("===============\n");

    printf("Hello World!\n");

    printf("%d\n", a(5));

    int width, height;
    get_bmp_info("res/arrow.bmp", &width, &height);

    printf("width: %d, height: %d\n", width, height);
    show_bmp_2_lcd("res/arrow.bmp", lcd_mmap);
    return 0;
}
